package com.koala.learn.paramslearn;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author yantingrui
 * @date 2021/12/7   15:43
 */
@Data
@Accessors(chain = true)
public class Params {

    private Integer type;

    private Condition condition;

    public String objectToString(){
        return JSON.toJSONString(this);
    }

    public Params stringToObject(String s){
        return JSON.parseObject(s, Params.class);
    }


}
